//
//  DiscoverModelFirstData.m
//  XYFMApp
//
//  Created by 岁变 on 16/8/31.
//  Copyright © 2016年 岁变. All rights reserved.
//

#import "DiscoverModelFirstData.h"
#import "XYMacro.h"

@implementation DiscoverModelFirstData

- (void)setValue:(id)value forKey:(NSString *)key {
    
    if ([key isEqualToString:@"special_list"]) {
        NSMutableArray *mArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            DiscoverModelFirstPopularity *model = [DiscoverModelFirstPopularity modelWithDictionary:dic];
            [mArr addObject:model];
        }
        self.special_list = mArr;
    }
    if ([key isEqualToString:@"best_items"]) {
        NSMutableArray *mArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            DiscoverModelFirstRecommend *model = [DiscoverModelFirstRecommend modelWithDictionary:dic];
            [mArr addObject:model];
        }
        self.best_items = mArr;
    }
    if ([key isEqualToString:@"banner_list"]) {
        NSMutableArray *mArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            DiscoverModelFirstScroll *model = [DiscoverModelFirstScroll modelWithDictionary:dic];
            [mArr addObject:model];
        }
        self.banner_list = mArr;
    }
//    if ([key isEqualToString:@"event_list"]) {
//        NSMutableArray *mArr = [NSMutableArray array];
//        for (NSDictionary *dic in value) {
//            DiscoverModelFirstSpecial *model = [DiscoverModelFirstSpecial modelWithDictionary:dic];
//            [mArr addObject:model];
//        }
//        self.event_list = mArr;
//    }
    if ([key isEqualToString:@"best_musiclist"]) {
        NSMutableArray *mArr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            DiscoverModelFirstMain *model = [DiscoverModelFirstMain modelWithDictionary:dic];
            [mArr addObject:model];
        }
        self.best_musiclist = mArr;
    }
}

@end
